A storage device including a plurality of logical volumes for storing data, and a storage controller for controlling an access from a host to the logical volume is known. If access areas (addresses) in a read request to the logical volume are consecutive, the storage controller pre-reads data of the consecutive areas in a cache area without making an input/output to/from the logical volume after a succeeding access occurs. Such a preread operation of consecutive areas is called a prefetch.
By performing a prefetch, a latency and a physical seek time of a magnetic disk can be sometimes shortened for a sequential access. Therefore, a response to a read request issued from the host that accesses the storage device can be improved. Accordingly, sequential performance can be enhanced.
To perform a prefetch, the storage controller monitors consecutiveness of access areas in a read request. The storage controller determines that a prefetch is effective if a specified number (fixed value n) of access areas in the read request are consecutive, and prereads (a fixed number of) address areas predicted to be read by a succeeding read request.
Here, if accesses to the storage device are not sequential but random, LBAs (Logical Block Addresses) to be accessed by a succeeding access cannot be predicted. Therefore, a prefetch operation is not performed.
In regard to monitoring the consecutiveness of addresses, the storage controller can simultaneously monitor, for example, a maximum of 8 consecutive addresses for one LUN (Logical Unit Number). Moreover, n (fixed value), which is a point of determining whether or not to perform a prefetch, can be set, for example, via an MMI (Man Machine Interface).
One example of the prefetch operation performed by the storage controller is described with reference to FIGS. 1 and 2. FIG. 1 is an explanatory diagram of detection of access sequentiality and a prefetch start. FIG. 2 is an explanatory diagram of a continuance and a stoppage of a prefetch.
In the example of FIG. 1, the amount of data prefetched at one time is up to a size of an I/O (Input/Output) from a host×8 (for example, 2 MB at a maximum). A condition for starting a prefetch (hereinafter referred to as a sequentiality detection condition) may be set, for example, to a case where 3 (n=3) addresses (LBAs) specified in consecutive I/O accesses made from the host are consecutive.
In the case of the sequentiality detection condition in this example, if 3 LBAs to be accessed are consecutive in consecutive I/O accesses from the host, the storage controller determines that the consecutive accesses have sequentiality, and starts a prefetch operation for fourth and subsequent accesses.
Additionally, if LBAs accessed from the host are consecutive even though a maximum amount of a prefetch is exceeded, a prefetch operation is continuously performed. As illustrated in the example of FIG. 2, when accesses to consecutive LBAs further occur after pre#1 is prefetched, a prefetch operation is continuously performed for pre#2 and pre#3. Thereafter, this prefetch operation is stopped at a time point when LBAs accessed from the host are not consecutive any more.
The number of consecutive addresses of blocks accessed from the host is sometimes referred to as the number of sequentially consecutive blocks.
Techniques described in the following documents are known.    Document 1: Japanese Laid-open Patent Publication No. 2007-249457    Patent Document 2: Japanese Laid-open Patent Publication No. 06-332629
However, if data preread into a cache by a prefetch is not accessed from the host, this means that an unneeded access to a logical volume is made. Such an unneeded access to a logical volume raises a busy rate of a disk, leading to degradation of performance of a read from the disk.